package test.mdd

import org.goodsl.mdd.TypeSetting
import org.goodsl.mdd.annotation.Setting;
import org.junit.Test;

import java.lang.annotation.Annotation;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 12-11-20
 * Time: 上午9:38
 * To change this template use File | Settings | File Templates.
 */
public class TestSetting {

    @Test
    public void testNoteParse(){
        Annotation settingAnnotation = A.class.getAnnotation(Setting.class);
        TypeSetting ss = new TypeSetting((Setting)settingAnnotation);
        assert  ss.alias == "用户名"
        assert  ss.desc == "这个是用户名"

        assert ss.size == "5"
        assert ss.length == "4"

        assert ss.nothanks == ""




    }
}

@Setting(
   alias = "用户名",desc = "这个是用户名",
   map = "[size:5,length:4]"
)
class A{

}
